<!-- userEditForm.php 用于显示要更新的用户信息的表单。 -->
<!doctype html>
<html>
 <head>
  <meta charset="UTF-8">  
  <title>修改视频管理信息</title>
 </head>
 <body>
 <?php
   require_once('inc_admin.php');
   connect();
   $id = $_GET['id'];
   $sql = "select * from videos where vid={$id}"; 
   $result = mysql_query($sql) or die('查询失败！'.mysql_error());   
   $row = mysql_fetch_assoc($result);
// $row=fetch_one($sql);//查询出一条记录
 ?>

<form method="post"  action="videoUpdate.php">
<table align="center" border="1" width=500>
<caption>修改视频管理信息</caption>
<tr>
  <td width="20%">id</td>
  <td width="80%"><?php  echo $row['vid'];  ?>
  <input type="hidden" name="id" value=<?php  echo $row['vid'];  ?>>  
  </td>
</tr>
<tr>
  <td>视频名称</td>
  <td><input type="text" name="videoname" size=30  value=<?php  echo $row['videoname'];  ?>></td>
</tr>
<tr>
  <td>视频类型</td>
  <td><input type="text" name="tid" size=30  value=<?php  echo $row['tid'];  ?>></td>
</tr>
<tr>
  <td>海报</td>
  <td><input type="file" name="pic" size=30  value=<?php  echo $row['pic'];  ?>></td>
</tr>
<tr>
  <td>内容简介</td>
  <td><input type="text" name="intro" size=30  value=<?php  echo $row['intro'];  ?>></td>
</tr>
<tr>
  <td>添加日期</td>
  <td><input type="date" name="uploaddate" size=30  value=<?php  echo $row['uploaddate'];  ?>></td>
</tr>
<tr>
  <td>上传用户</td>
  <td><input type="text" name="uploadadmin" size=30  value=<?php  echo $row['uploadadmin'];  ?>></td>
</tr>
<tr>
  <td>点击量</td>
  <td><input type="text" name="hittimes" size=30  value=<?php  echo $row['hittimes'];  ?>></td>
</tr>
<tr>
  <td>下载量</td>
  <td><input type="text" name="downtimes" size=30  value=<?php  echo $row['downtimes'];  ?>></td>
</tr>
<tr>
  <td>下载地址</td>
  <td><input type="text" name="address" size=30  value=<?php  echo $row['address'];  ?>></td>
</tr>
<tr>
  <td width=150></td>
  <td>
    <input type="submit" value="修改">
    <input type="reset" name="submit" onclick="javascript:history.back(-1);" value=取消>
  </td>
</tr>
</table>
</form>
 </body>
</html>